import './App.css';
import React from 'react';

export default class PopupDialog extends React.Component<{ title: string }, { display: "up" | "down" | "" }> {
    constructor(props: any) {
        super(props);
        this.state = {
            display: "down"
        }
    }
    render() {
        if (this.state.display === "") return <></>;
        return (
            <div className={"popup-dialog " + this.state.display}>
                <h2 style={{ height: "7%" }}>
                    {this.props.title}
                </h2>
                <div style={{ position: "relative", height: "83%" }}>
                    {this.props.children}
                </div>
            </div>);
    }
}